The present invention relates to the compression of impulse response signals such as those derived from an impulse response measurement of a room or environment.
Room impulse responses are heavily utilised in convolution of audio signals so as to produce improved audio responses.
Turning initially to FIG. 1, there is illustrated the first 10,000 samples of a room impulse response signal. It can be seen from FIG. 1 that most room impulse response, signals have the characteristic of having several regions of significant energy surrounded by large regions of very low energy including a xe2x80x9ctailxe2x80x9d that tends to diminish to zero.
Unfortunately, given a predetermined level of quantisation, the number of bits necessary to represent the high energy sections eg 1 will be substantially greater than the number required for the low energy sections eg 2.
It would therefore be desirable if a method could be provided for a small compact form of representation of the room impulse response.
In accordance with a first aspect of the present invention, there is provided a method of compressing an audio signal comprising a series of values, the method comprising dividing the audio signal into a series of blocks of a predetermined length; and for each of the blocks: computing the maximum number of bits required to represent the values within a block; packing an indicator of the maximum number of bits in an output stream; and packing only the maximum number of bits of each coefficient value in the value in the bitstream.
In accordance with a second aspect of the present invention, there is provided a method of compressing an audio signal comprising a series of values, the method comprising: utilising a predetermined maximum number of bits B for representing values; dividing the audio signal into a series of blocks of a predetermined length N; and for each of the blocks:
computing the maximum number of bits b required to represent the values within a block;
packing an indicator of b bits in an output stream; and
for each value within the block:
where the value exceeds 2B writing the value to the output stream.
The aforementioned methods are well suited to compressing impulse response functions.
In accordance with ta further aspect of the present invention, there is provided a method fo decoding an audio signal encoded by the aforementioned methods.